package options

import "errors"

// TODO: global options

type StartVmiOptions struct {
	// If present, the namespace scope for this CLI request
	NameSpace string
}

type StopVmiOptions struct {
	// If present, the namespace scope for this CLI request
	NameSpace string
}

type ExposeVmiOptions struct {
	// Name of the service created for the exposure of the VM
	Name string

	// If present, the namespace scope for this CLI request
	NameSpace string

	// Type for this service: ClusterIP, NodePort, or LoadBalancer. (default "ClusterIP")
	Type string

	// The port that the service should serve on
	Port int32

	// Name or number for the port on the VM that the service should direct traffic to. Optional.
	TargetPort int32
}

func (op ExposeVmiOptions) ExposeOptionsCheck() error {
	if op.Name == `` {
		return errors.New("service name is not set")
	}

	if op.Port == 0 {
		return errors.New("service port is not set")
	}

	return nil
}
